
local xiaoxian = fk.CreateSkill {
  name = "lingling__xiaoxian",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["lingling__xiaoxian"] = "小鲜",
  [":lingling__xiaoxian"] = "锁定技，当你受到伤害时，若伤害大于1点，则防止多余的伤害。",
}

xiaoxian:addEffect(fk.DamageInflicted, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(xiaoxian.name) and
      data.damage > 1
  end,
  on_use = function(self, event, target, player, data)
    data:changeDamage(1 - data.damage)
  end,
})

return xiaoxian
